blob: 61dbabdd288a4fa22f4cd4d46a8e089848ac6cc6 [file] [log] [blame]
Dominique Hazael-Massieuxf69fc722013-05-30 12:31:401<!DOCTYPE html>
2<html xmlns='http://www.w3.org/1999/xhtml' lang='en'>
3 <head>
4 <meta charset='utf-8'/>
5 <title>Vibration API: test a pattern array parameter to vibrate() with an extra (even) item</title>
6 <link rel='author' title='Robin Berjon' href='mailto:robin@berjon.com'/>
7 <link rel='help' href='http://www.w3.org/TR/vibration/#methods'/>
Dominique Hazael-Massieuxc3911b92014-03-10 11:05:208 <meta name='flags' content=dom, interact'/>
Dominique Hazael-Massieuxf69fc722013-05-30 12:31:409 <meta name='assert' content='If the length of pattern is even, then remove the last entry in pattern.'/>
Dominique Hazael-Massieuxc3911b92014-03-10 11:05:2010 <!--
Dominique Hazael-Massieuxf69fc722013-05-30 12:31:4011 When you review this test, please add
12 <link rel='reviewer' title='Your Name' href='mailto:your-email-address'/>
13 -->
Dominique Hazael-Massieux4ead9a62013-05-30 12:33:3714 <link rel='stylesheet' href='/resources/testharness.css' media='all'/>
Dominique Hazael-Massieuxf69fc722013-05-30 12:31:4015 </head>
16 <body>
17 <h1>Description</h1>
18 <p>
19 After hitting the button below, your device must vibrate three times for one second, separated
20 by one second intervals.
21 </p>
22 <button id='vib'>Vibrate!</button>
23 <div id='log'></div>
Dominique Hazael-Massieux4ead9a62013-05-30 12:33:3724 <script src='/resources/testharness.js'></script>
Dominique Hazael-Massieuxc3911b92014-03-10 11:05:2025 <script src='/resources/testharnessreport.js'></script>
26 <script src='/common/vendor-prefix.js' data-prefixed-objects='[{"ancestors":["navigator"], "name":"vibrate"}]'></script>
Dominique Hazael-Massieuxf69fc722013-05-30 12:31:4027 <script>
Dominique Hazael-Massieuxc3911b92014-03-10 11:05:2028 if (undefined !== navigator.vibrate) {
Dominique Hazael-Massieuxf69fc722013-05-30 12:31:4029 document.getElementById("vib").onclick = function () {
30 navigator.vibrate([1000, 1000, 1000, 1000, 1000, 1000]);
31 };
32 }
33 </script>
34 </body>
35</html>